; generated by ARM C/C++ Compiler, 4.1 [Build 481]
; commandline ArmCC [--c99 --split_sections --debug -c --asm --interleave -o.\obj\nano1xx_gpio.o --depend=.\obj\nano1xx_gpio.d --feedback=.\obj\START_KIT.fed --cpu=Cortex-M0 --apcs=interwork -O0 -I.\Libraries -I.\Include -I.\Users -ID:\Keil\ARM\INC -ID:\Keil\ARM\INC\Nuvoton -D__MICROLIB -D__LCDDISPLAY_BTL001_LB_H --omf_browse=.\obj\nano1xx_gpio.crf Libraries\nano1xx_gpio.c]
                          THUMB

                          AREA ||i.GPIO_DisableEINT0||, CODE, READONLY, ALIGN=1

                  GPIO_DisableEINT0 PROC
;;;99       */
;;;100    void GPIO_DisableEINT0(GPIO_TypeDef *port, uint32_t bit)
000000  b570              PUSH     {r4-r6,lr}
;;;101    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;102    	port->IER &= (~((1 << bit) | (1 << (bit + 16))));
000006  2001              MOVS     r0,#1
000008  40a8              LSLS     r0,r0,r5
00000a  4629              MOV      r1,r5
00000c  3110              ADDS     r1,r1,#0x10
00000e  2201              MOVS     r2,#1
000010  408a              LSLS     r2,r2,r1
000012  4310              ORRS     r0,r0,r2
000014  69e1              LDR      r1,[r4,#0x1c]
000016  4381              BICS     r1,r1,r0
000018  61e1              STR      r1,[r4,#0x1c]
;;;103    	NVIC_DisableIRQ(EINT0_IRQn);
00001a  2002              MOVS     r0,#2
00001c  f7fffffe          BL       NVIC_DisableIRQ
;;;104    }
000020  bd70              POP      {r4-r6,pc}
;;;105    
                          ENDP


                          AREA ||i.GPIO_DisableEINT1||, CODE, READONLY, ALIGN=1

                  GPIO_DisableEINT1 PROC
;;;126      */
;;;127    void GPIO_DisableEINT1(GPIO_TypeDef *port, uint32_t bit)
000000  b570              PUSH     {r4-r6,lr}
;;;128    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;129    	port->IER &= (~((1 << bit) | (1 << (bit + 16))));
000006  2001              MOVS     r0,#1
000008  40a8              LSLS     r0,r0,r5
00000a  4629              MOV      r1,r5
00000c  3110              ADDS     r1,r1,#0x10
00000e  2201              MOVS     r2,#1
000010  408a              LSLS     r2,r2,r1
000012  4310              ORRS     r0,r0,r2
000014  69e1              LDR      r1,[r4,#0x1c]
000016  4381              BICS     r1,r1,r0
000018  61e1              STR      r1,[r4,#0x1c]
;;;130    	NVIC_DisableIRQ(EINT1_IRQn);
00001a  2003              MOVS     r0,#3
00001c  f7fffffe          BL       NVIC_DisableIRQ
;;;131    }
000020  bd70              POP      {r4-r6,pc}
;;;132    
                          ENDP


                          AREA ||i.GPIO_DisableInt||, CODE, READONLY, ALIGN=2

                  GPIO_DisableInt PROC
;;;62       */
;;;63     void GPIO_DisableInt(GPIO_TypeDef *port, uint32_t bit)
000000  b570              PUSH     {r4-r6,lr}
;;;64     {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;65     	port->IER &= ~((1 << bit) | (1 << (bit+16)));
000006  2001              MOVS     r0,#1
000008  40a8              LSLS     r0,r0,r5
00000a  4629              MOV      r1,r5
00000c  3110              ADDS     r1,r1,#0x10
00000e  2201              MOVS     r2,#1
000010  408a              LSLS     r2,r2,r1
000012  4310              ORRS     r0,r0,r2
000014  69e1              LDR      r1,[r4,#0x1c]
000016  4381              BICS     r1,r1,r0
000018  61e1              STR      r1,[r4,#0x1c]
;;;66     
;;;67     	/* Disable the relative interrupt of M0 */
;;;68     	if ((port == GPIOA) || (port == GPIOB) || (port == GPIOC))
00001a  480e              LDR      r0,|L3.84|
00001c  4284              CMP      r4,r0
00001e  d007              BEQ      |L3.48|
000020  480c              LDR      r0,|L3.84|
000022  3040              ADDS     r0,r0,#0x40
000024  4284              CMP      r4,r0
000026  d003              BEQ      |L3.48|
000028  480a              LDR      r0,|L3.84|
00002a  3080              ADDS     r0,r0,#0x80
00002c  4284              CMP      r4,r0
00002e  d102              BNE      |L3.54|
                  |L3.48|
;;;69     	{
;;;70     		NVIC_DisableIRQ(GPABC_IRQn);
000030  2004              MOVS     r0,#4
000032  f7fffffe          BL       NVIC_DisableIRQ
                  |L3.54|
;;;71     	}
;;;72     
;;;73     	if ((port == GPIOD) || (port == GPIOE) || (port == GPIOF))
000036  4807              LDR      r0,|L3.84|
000038  30c0              ADDS     r0,r0,#0xc0
00003a  4284              CMP      r4,r0
00003c  d006              BEQ      |L3.76|
00003e  4806              LDR      r0,|L3.88|
000040  4284              CMP      r4,r0
000042  d003              BEQ      |L3.76|
000044  4804              LDR      r0,|L3.88|
000046  3040              ADDS     r0,r0,#0x40
000048  4284              CMP      r4,r0
00004a  d102              BNE      |L3.82|
                  |L3.76|
;;;74     	{
;;;75     		NVIC_DisableIRQ(GPDEF_IRQn);
00004c  2005              MOVS     r0,#5
00004e  f7fffffe          BL       NVIC_DisableIRQ
                  |L3.82|
;;;76     	}
;;;77     }
000052  bd70              POP      {r4-r6,pc}
;;;78     
                          ENDP

                  |L3.84|
                          DCD      0x50004000
                  |L3.88|
                          DCD      0x50004100

                          AREA ||i.GPIO_EnableEINT0||, CODE, READONLY, ALIGN=1

                  GPIO_EnableEINT0 PROC
;;;86       */
;;;87     void GPIO_EnableEINT0(GPIO_TypeDef *port, uint32_t bit, uint32_t TriggerType, uint32_t Mode)
000000  b5f8              PUSH     {r3-r7,lr}
;;;88     {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
000008  461f              MOV      r7,r3
;;;89     	port->IER |= TriggerType;
00000a  69e0              LDR      r0,[r4,#0x1c]
00000c  4330              ORRS     r0,r0,r6
00000e  61e0              STR      r0,[r4,#0x1c]
;;;90     	port->IMD = (port->IMD & ~(1 << bit) | Mode);
000010  69a0              LDR      r0,[r4,#0x18]
000012  2101              MOVS     r1,#1
000014  40a9              LSLS     r1,r1,r5
000016  4388              BICS     r0,r0,r1
000018  4338              ORRS     r0,r0,r7
00001a  61a0              STR      r0,[r4,#0x18]
;;;91     	NVIC_EnableIRQ(EINT0_IRQn);
00001c  2002              MOVS     r0,#2
00001e  f7fffffe          BL       NVIC_EnableIRQ
;;;92     }
000022  bdf8              POP      {r3-r7,pc}
;;;93     
                          ENDP


                          AREA ||i.GPIO_EnableEINT1||, CODE, READONLY, ALIGN=1

                  GPIO_EnableEINT1 PROC
;;;113      */
;;;114    void GPIO_EnableEINT1(GPIO_TypeDef *port, uint32_t bit, uint32_t TriggerType, uint32_t Mode)
000000  b5f8              PUSH     {r3-r7,lr}
;;;115    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
000008  461f              MOV      r7,r3
;;;116    	port->IER |= TriggerType;
00000a  69e0              LDR      r0,[r4,#0x1c]
00000c  4330              ORRS     r0,r0,r6
00000e  61e0              STR      r0,[r4,#0x1c]
;;;117    	port->IMD = (port->IMD & ~(1 << bit) | Mode);
000010  69a0              LDR      r0,[r4,#0x18]
000012  2101              MOVS     r1,#1
000014  40a9              LSLS     r1,r1,r5
000016  4388              BICS     r0,r0,r1
000018  4338              ORRS     r0,r0,r7
00001a  61a0              STR      r0,[r4,#0x18]
;;;118    	NVIC_EnableIRQ(EINT1_IRQn);
00001c  2003              MOVS     r0,#3
00001e  f7fffffe          BL       NVIC_EnableIRQ
;;;119    }
000022  bdf8              POP      {r3-r7,pc}
;;;120    
                          ENDP


                          AREA ||i.GPIO_EnableInt||, CODE, READONLY, ALIGN=2

                  GPIO_EnableInt PROC
;;;37       */
;;;38     void GPIO_EnableInt(GPIO_TypeDef *port, uint32_t bit, uint32_t TriggerType, uint32_t Mode)
000000  b5f8              PUSH     {r3-r7,lr}
;;;39     {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
000008  461f              MOV      r7,r3
;;;40     	port->IER |= TriggerType;
00000a  69e0              LDR      r0,[r4,#0x1c]
00000c  4330              ORRS     r0,r0,r6
00000e  61e0              STR      r0,[r4,#0x1c]
;;;41     	port->IMD = (port->IMD & ~(1 << bit) | Mode);
000010  69a0              LDR      r0,[r4,#0x18]
000012  2101              MOVS     r1,#1
000014  40a9              LSLS     r1,r1,r5
000016  4388              BICS     r0,r0,r1
000018  4338              ORRS     r0,r0,r7
00001a  61a0              STR      r0,[r4,#0x18]
;;;42     
;;;43     	/* Enable the relative interrupt of M0 */
;;;44     	if ((port == GPIOA) || (port == GPIOB) || (port == GPIOC))
00001c  480e              LDR      r0,|L6.88|
00001e  4284              CMP      r4,r0
000020  d007              BEQ      |L6.50|
000022  480d              LDR      r0,|L6.88|
000024  3040              ADDS     r0,r0,#0x40
000026  4284              CMP      r4,r0
000028  d003              BEQ      |L6.50|
00002a  480b              LDR      r0,|L6.88|
00002c  3080              ADDS     r0,r0,#0x80
00002e  4284              CMP      r4,r0
000030  d102              BNE      |L6.56|
                  |L6.50|
;;;45     	{
;;;46     		//NVIC_SetPriority(GPABC_IRQn, (1<<__NVIC_PRIO_BITS) - 2);
;;;47     		NVIC_EnableIRQ(GPABC_IRQn);
000032  2004              MOVS     r0,#4
000034  f7fffffe          BL       NVIC_EnableIRQ
                  |L6.56|
;;;48     	}
;;;49     
;;;50     	if ((port == GPIOD) || (port == GPIOE) || (port == GPIOF))
000038  4807              LDR      r0,|L6.88|
00003a  30c0              ADDS     r0,r0,#0xc0
00003c  4284              CMP      r4,r0
00003e  d006              BEQ      |L6.78|
000040  4806              LDR      r0,|L6.92|
000042  4284              CMP      r4,r0
000044  d003              BEQ      |L6.78|
000046  4805              LDR      r0,|L6.92|
000048  3040              ADDS     r0,r0,#0x40
00004a  4284              CMP      r4,r0
00004c  d102              BNE      |L6.84|
                  |L6.78|
;;;51     	{
;;;52     		//NVIC_SetPriority(GPDEF_IRQn, (1<<__NVIC_PRIO_BITS) - 2);
;;;53     		NVIC_EnableIRQ(GPDEF_IRQn);
00004e  2005              MOVS     r0,#5
000050  f7fffffe          BL       NVIC_EnableIRQ
                  |L6.84|
;;;54     	}
;;;55     }
000054  bdf8              POP      {r3-r7,pc}
;;;56     
                          ENDP

000056  0000              DCW      0x0000
                  |L6.88|
                          DCD      0x50004000
                  |L6.92|
                          DCD      0x50004100

                          AREA ||i.NVIC_DisableIRQ||, CODE, READONLY, ALIGN=2

                  NVIC_DisableIRQ PROC
;;;809     */
;;;810    static __INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
000000  06c2              LSLS     r2,r0,#27
;;;811    {
;;;812      NVIC->ICER[0] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* disable interrupt */
000002  0ed2              LSRS     r2,r2,#27
000004  2101              MOVS     r1,#1
000006  4091              LSLS     r1,r1,r2
000008  4a01              LDR      r2,|L7.16|
00000a  6011              STR      r1,[r2,#0]
;;;813    }
00000c  4770              BX       lr
;;;814    
                          ENDP

00000e  0000              DCW      0x0000
                  |L7.16|
                          DCD      0xe000e180

                          AREA ||i.NVIC_EnableIRQ||, CODE, READONLY, ALIGN=2

                  NVIC_EnableIRQ PROC
;;;796     */
;;;797    static __INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
000000  06c2              LSLS     r2,r0,#27
;;;798    {
;;;799      NVIC->ISER[0] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* enable interrupt */
000002  0ed2              LSRS     r2,r2,#27
000004  2101              MOVS     r1,#1
000006  4091              LSLS     r1,r1,r2
000008  4a01              LDR      r2,|L8.16|
00000a  6011              STR      r1,[r2,#0]
;;;800    }
00000c  4770              BX       lr
;;;801    
                          ENDP

00000e  0000              DCW      0x0000
                  |L8.16|
                          DCD      0xe000e100
